Hard disk drives are used in almost all computer system operations. In fact, most computing systems are not operational without some type of hard disk drive to store the most basic computing information such as the boot operation, the operating system, the applications, and the like. In general, the hard disk drive is a device which may or may not be removable, but without which the computing system will generally not operate.
The basic hard disk drive model was established approximately 50 years ago and resembles a phonograph. That is, the hard drive model includes a storage disk or hard disk that spins at a substantially constant rotational speed. An actuator arm or slider is utilized to reach out over the disk. The arm has a head-gimbal-assembly (HGA) composed of a suspension, flexure and a slider carrying the read/write components.
In operation, the hard disk is rotated at a set speed via a spindle motor assembly having a central drive hub. Additionally, there are tracks evenly spaced at known intervals across the disk. When a request for a read of a specific portion or track is received, the actuator and servo-system of the hard drive aligns the head, via the arm, over the specific track location and the head reads the information from the disk. In the same manner, when a request for a write of a specific portion or track is received, the hard disk aligns the head, via the arm, over the specific track location and the head writes the information to the disk.
In the past, sectors of 512 bytes were the smallest individual storage units available on a hard disk drive. However, as the capacity of hard disk drives has grown, it has become increasingly inefficient to implement storage in 512 byte sectors. As a result, recent trends in hard disk drive technology have implemented larger sectors (e.g., 4096 bytes). However, the file systems of older operating systems may not be compatible with these larger sectors. Thus, to be backward compatible with these older file systems, the larger sectors are divided into “logical blocks” of 512 bytes.
Because the sector is the smallest individual unit to which data can be written to, the newer hard disk drives are limited to writing an entire 4096 byte sector, even if less than the entire 4096 byte capacity of the sector is being modified. Thus, when working with older file systems, when one logical block is being modified, the entire sector is read into memory, the data in one or more logical blocks is modified, and the data is re-written over the original data in that sector. Typically, this process is managed transparently by the hard disk drive so that the hard disk drive appears, to the host system, to be composed of 512 byte sectors.
However, this opens a potential data integrity problem if the re-write operation is not completed due to, for example, a sudden power loss of the host system. More specifically, if only part of the original data in the sector has been overwritten prior to the power loss, the entire sector is invalid and the original data in the sector may be irretrievably lost. Additionally, there may be no way to determine that the original data was affected by the power loss. This is particularly problematic in an unaligned write operation (e.g., a write operation in which only a portion of the original data is being overwritten). While current systems provide for the recovery of data when the data being written to a sector comprises entirely new data (e.g., an aligned write operation), they do not provide data recovery in an unaligned write operation.